<template>
   <div class="rightContainer" >
        <h3>数据接收方 --- count 的值为{{ num }}</h3>
  </div>
</template>

<script>
import bus from './eventBus.js'

export default {
    data(){
        return {
            num:0
        }
    },
    created(){
        bus.on('countChange',(count)=>{
            this.num=count
        })
    }
}
</script>

<style scoped lang="less" >
.rightContainer{
     flex: 1;
     border: 1px solid #ccc;
     height: 200px;
}
</style>